#pragma once
#ifndef SKYNET_FLOW_H_
#define SKYNET_FLOW_H_

#include "stream_tools.h"

constexpr unsigned N_BATCH = 1;

constexpr unsigned N_IN = 4;
constexpr unsigned N_OUT = 1;

constexpr unsigned BIT_ACTV = 8;
constexpr unsigned BIT_WEIT = 5;
constexpr unsigned BIT_BIAS = 16;
constexpr unsigned BIT_MULT = 16;
constexpr unsigned BIT_CONV = 16;
constexpr unsigned BIT_NORM = 18;

constexpr unsigned R_SHIFT = 16;

constexpr unsigned ROWIN = 360;
constexpr unsigned COLIN = 640;
constexpr unsigned ROW0 = 160;
constexpr unsigned COL0 = 320;
constexpr unsigned ROW1 = ROW0 / 2;
constexpr unsigned COL1 = COL0 / 2;
constexpr unsigned ROW2 = ROW1 / 2;
constexpr unsigned COL2 = COL1 / 2;
constexpr unsigned ROW3 = ROW2 / 2;
constexpr unsigned COL3 = COL2 / 2;

constexpr unsigned DEFAULT_DEPTH = 4;

void skynet_flow(data_stream<N_IN * BIT_ACTV>& in, axiu_stream<N_OUT * BIT_CONV>& out);

#endif
